import http from '@/common/service/service.js'

const apiService = {
	install(Vue) {
		Vue.prototype.$api = apiService
	},

	/**
	 * 获取版本号
	 */
	async getVersion(params) {
		return http.post('/version/info', params)
	},

	// 获取一个
	async getOne(params) {
		return http.get('/bank/bankcard/getOne', { params })
	},

	// 修改银行卡信息
	async updateBankCard(params) {
		return http.get('/bank/bankcard/updateById', { params })
	},
	// 新增银行卡
	async addBankCard(params) {
		return http.post('/bank/bankcard/save', params)
	},
	// 充值
	async reCharge(params) {
		return http.post('/bank/bankcard/recharge', params)
	},
	// 转账(新增流水)
	async addBankFlowingwater(params) {
		return http.post('/bank/bankflowingwater/save', params)
	},
	// 修改流水
	async updateBankFlowingwater(params) {
		return http.post('/bank/bankflowingwater/update', params)
	},
	// 流水列表
	async getBankFlowingwaterList(params) {
		return http.post('/bank/bankflowingwater/list', params)
	},
	// 金额统计
	async getBankFlowingwaterInfo(params) {
		return http.get('/bank/bankflowingwater/getInfo', { params })
	},
	// 获取一个
	async getBankFlowingwaterOne(params) {
		return http.get('/bank/bankflowingwater/getOne', { params })
	},
	/**
	 * 上传图片
	 */
	async uploadheadImg(params) {
		return http.upload('/upload/head_img', params);
	},

}

export default apiService
